package com.devunion.bogdan.view.actions;

import java.util.HashMap;

/**
 * User: user
 * Date: 07.11.2004
 * Time: 19:48:57
 */

/**
 * Provides information about all available actions
 */
public class ActionHelper {
    private static HashMap actions = new HashMap(0);

    static {
/*
        String[] actionNames = new File(PathHelper.getRootPath() + "view\\actions\\").list();

        for (int i = 0; i < actionNames.length; i++) {
            try {
                //actions.put(actionNames[i], Class.forName("com.devunion.bogdan.view.actions." + actionNames[i].substring(0, actionNames[i].indexOf("."))).newInstance());
                Class c = Class.forName("com.devunion.bogdan.view.actions." + actionNames[i].substring(0, actionNames[i].indexOf(".")));
                Constructor constr = null;
                try {
                    System.out.println("actionNames[" + i + "] = " + actionNames[i]);
                    constr = c.getConstructor(new Class[] {FileManager.class});
                } catch (NoSuchMethodException e) {
                    e.printStackTrace();
                }
                System.out.println("constr = " + constr);

                System.out.println(Class.forName("com.devunion.bogdan.view.actions." + actionNames[i].substring(0, actionNames[i].indexOf("."))).newInstance());
            } catch (ClassNotFoundException e) {
                e.printStackTrace();
            } catch (IllegalAccessException e) {
                e.printStackTrace();
            } catch (InstantiationException e) {
                e.printStackTrace();
            }
        }
*/
    }

    public static HashMap getAllActions() {
        return actions;
    }
}
